package com.zhujiekaifa.dao.impl;

import com.zhujiekaifa.dao.UserDao;
import org.springframework.stereotype.Repository;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

//<bean id="userDao-zj" class="com.zhujiekaifa.dao.impl.UserDaoImpl"></bean>
//@Component("userDao-zj") 三个意思效果相同
@Repository("userDao-zj")
public class UserDaoImpl implements UserDao {

    @PostConstruct
    public void init() {
        System.out.println("初始化方法已执行");
    }
    @PreDestroy
    public void destroy() {
        System.out.println("销毁方法已执行");
    }


    @Override
    public void save() {
        System.out.println("注解开发正在测试");
    }


}
